<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
</head>
<body>
<div id="app">
    <div>{{fullName}}</div>
</div>
<script>
    var app = new Vue({
        el: '#app',
        data: {
            firstName: 'zhang',
            lastName:'san',
            fullName: 'zhang san'
        },
        watch:{
            firstName(val) {
                this.fullName = val + ' ' + this.lastName;
            },
            lastName(val) {
                this.fullName = this.firstName + ' ' + val;
            }
        }
    })
</script>
</body>
</html>